package com.kakarote.hrm.service.impl;

import com.kakarote.core.entity.BasePage;
import com.kakarote.core.servlet.BaseServiceImpl;
import com.kakarote.hrm.entity.PO.HrmRecruitReportLog;
import com.kakarote.hrm.entity.VO.RecruitReportLogVO;
import com.kakarote.hrm.mapper.HrmRecruitReportLogMapper;
import com.kakarote.hrm.service.IHrmRecruitReportLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 招聘计划日志记录 服务实现类
 * </p>
 *
 * @author system
 * @since 2024-01-01
 */
@Service
public class HrmRecruitReportLogServiceImpl extends BaseServiceImpl<HrmRecruitReportLogMapper, HrmRecruitReportLog> implements IHrmRecruitReportLogService {

    @Autowired
    private HrmRecruitReportLogMapper reportLogMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean addReportLog(HrmRecruitReportLog reportLog) {
        return save(reportLog);
    }

    @Override
    public List<RecruitReportLogVO> queryByPlanId(Long planId) {
        return reportLogMapper.queryByPlanId(planId);
    }


    @Override
    public HrmRecruitReportLog queryById(Long planLogId) {
        return getById(planLogId);
    }
}
